This document is intended as a quick reference, most useful to new Soar users.
Many of the commands follow a parent command / sub command structure, with options and arguments following. In many cases, there are aliases for common combinations. Most commands abd subcommands include a help subcommand that describes the command. Here is a summary of some of the most useful commands; most of what's here also applies to CSoar:
help : With no args, lists all the commands. Optionally takes the name of a command and prints its help. Note that most commands have a help subcommand, and most subcommands have help sub-subcommands.help, help soar, soar help, soar init helpprint : Given the name of a rule, prints the rule. Given an identifier, prints the working memory structure rooted in that identifier. Can also take patterns.print my*ruleprint s1 : note that identifiers are not case sensitiveprint s1 --depth 3 --tree : print to a specified depth in a tree formatprint (* ^input-link *) : print identifiers that have an input-link attribute. Any pattern may be specified, with * for wildcards. Note this will print all the children of the identifier(s), not just the ones that match the pattern. To get only the ones that match the pattern, add the --exact option. Also see the WME Search panel below for a graphical way to execute this command.prun : Runs Soar for the specified number of steps in the specified unitsrun -d : run one decisionrun 12 -e : run 12 smallest stepsstep = run -dsoar stop : Stop the Soar agent at the next stop pointstopsoar init : Reinitialize the Soar agent (i.e., clear working memory, reset stats, but do not change production memory)inittrace : Set the verbosity of the trace output when Soar is running. Default levels 0-5 correspond to common combinations of settings. Default is level 1.trace 0 : Minimal outputtrace 5 : Very verbose outputtrace --wmes : Print when WMEs are added to or removed from working memorywatchproduction matches : Print whether a rule matches, and how many times. If a rule doesn't match, shows the first failing condition. Also shows number of partial matches, which is useful for performance tuning.matches my*rulematchesproduction firing-counts : Prints the number of times each rule has fired, or a specific rule (if specified), or the top n rules, if given a numeric argument.production firing-counts : Shows the number of times every rule has fired.production firing-counts my*rule : Shows the number of times my*rule has fired.production firing-counts 10 : Shows the number of times the 10 most-fired rules have fired.firing-counts, fcpreferences : Shows whether a WME has i-support or o-support and, if an operator, preferences and selection probabilities. Can also show which rule(s) created a WME.preferences : Shows operator preferences for bottom-most statepreferences s1 : Shows operator preferences for state S1preferences s1 ^foo --names : Shows which rules created the WMEs rooted in s1 ^fooprefalias : Add a command alias, or list existing aliases. An alias is executed as if it were the command it represents. Note that while there are a number of default aliases, any new aliases added are not automatically saved anywhere. It is recommended that new aliases be added to your Soar code directly so they are automatically defined when your agent is loaded. Note that aliases cannot currently be removed once defined, but they may be replaced.alias : Lists existing command aliases.alias foo print s1 : Creates (or replaces) an alias, foo, for the command print s1.-DfontScale=<scale> where 1.0 is the default, and higher numbers are larger.Ctrl+scrollwheel. Note that this is imperfect, but may be good enough in many cases.View menu.print --exact command (see the example under the print command above).View -> Layout menu).